.layout {
  min-height: 100vh;
}

.header {
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: #001529;
  position: fixed;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .anticon {
  margin-right: 8px;
}

.content {
  margin-top: 64px;
  padding: 24px;
  background: #f0f2f5;
  min-height: calc(100vh - 64px);
}

.content-wrapper {
  background: white;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-area {
  border: 2px dashed #d9d9d9;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  margin-bottom: 24px;
  transition: all 0.3s;
}

.upload-area:hover {
  border-color: #1890ff;
  background: #f0f7ff;
}

.upload-area .anticon {
  font-size: 32px;
  color: #999;
  margin-bottom: 8px;
}

.image-grid {
  margin-top: 24px;
}

.image-card {
  transition: all 0.3s;
  overflow: hidden;
  position: relative;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-preview {
  width: 356px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px 4px 0 0;
  background: #f0f0f0;
  transition: opacity 0.3s;
  position: relative;
  margin: 0 auto;
}

.image-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  opacity: 0.5;
}

.image-preview[loading] {
  opacity: 0;
}

.image-preview:not([loading]) {
  opacity: 1;
}

.image-preview:not([loading])::before {
  display: none;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.image-actions {
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

@media (max-width: 768px) {
  .header {
    padding: 0 12px;
  }
  
  .content {
    padding: 12px;
  }
  
  .content-wrapper {
    padding: 16px;
  }
  
  .image-preview {
    width: 284px;
    height: 160px;
  }
  
  .image-card .ant-card-cover {
    min-height: 160px;
  }
}

/* 选择模式样式 */
.selection-mode .image-card {
  position: relative;
}

.selection-mode .image-card .ant-checkbox-wrapper {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}

/* Tabs样式优化 */
.ant-tabs-nav {
  margin-bottom: 24px !important;
}

.ant-tabs-tab {
  padding: 12px 24px !important;
}

/* 按钮组样式优化 */
.ant-radio-group {
  margin-bottom: 16px;
}

.ant-space {
  flex-wrap: wrap;
}

.ant-card-cover img {
  object-fit: cover;
  height: 200px;
}

.ant-card-meta-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-grid {
  margin-top: 24px;
}

.video-card {
  width: 100%;
  margin-bottom: 16px;
}

.video-card .ant-card-cover {
  height: 180px;
  overflow: hidden;
  background: #f0f0f0;
}

.video-card .ant-card-body {
  padding: 12px;
}

.video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
}

/* 修复标签页样式 */
.ant-tabs-nav {
  margin-bottom: 24px !important;
}

.ant-tabs-tab {
  padding: 12px 16px !important;
}

.video-card-cover {
  height: 180px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.video-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.video-player-container {
  width: 100%;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.video-player {
  width: 100%;
  max-height: calc(100vh - 200px);
  display: block;
}

.list-view {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
}

.list-item {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.3s;
}

.list-item:hover {
  background-color: #fafafa;
}

.list-item-image {
  width: 178px;
  height: 100px;
  object-fit: cover;
  margin-right: 24px;
  cursor: pointer;
  border-radius: 4px;
  background: #f0f0f0;
  transition: opacity 0.3s;
  position: relative;
}

.list-item-image[loading] {
  opacity: 0;
}

.list-item-image:not([loading]) {
  opacity: 1;
}

.list-item-info {
  flex: 1;
  min-width: 0;
}

.list-item-info > div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-item-delete {
  font-size: 18px;
  color: #ff4d4f;
  cursor: pointer;
}

/* 响应式调整 */
@media (max-width: 576px) {
  .list-item-image {
    width: 142px;
    height: 80px;
    margin-right: 16px;
  }
  
  .list-item-actions {
    flex-direction: column;
    align-items: flex-end;
  }
  
  .video-card-cover {
    height: 160px;
  }
  
  .image-preview {
    width: 213px;
    height: 120px;
  }
  
  .image-card .ant-card-cover {
    min-height: 120px;
  }
}

@media (max-width: 480px) {
  .image-preview {
    width: 160px;
    height: 90px;
  }
  
  .image-card .ant-card-cover {
    min-height: 90px;
  }
}

/* 修复视频预览模态框 */
.ant-modal-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ant-modal {
  top: 0 !important;
  padding-bottom: 0;
  margin: 20px 0;
}

.ant-modal-body {
  padding: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

/* 图片加载占位符 */
.image-placeholder {
  width: 100%;
  height: 100%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
}

/* 优化图片卡片布局 */
.image-card .ant-card-cover {
  position: relative;
  background: #f0f0f0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-card .ant-card-body {
  padding: 12px;
}

.image-card .ant-card-meta-title {
  margin-bottom: 4px;
  font-size: 14px;
}

.image-card .ant-card-meta-description {
  font-size: 12px;
  color: #999;
}
